<%@ Page Title="" Language="C#" MasterPageFile="~/SalesOneWeb.Master" AutoEventWireup="true" CodeBehind="AddBranch.aspx.cs" Inherits="IronOne.SalesOne.SalesOneWeb.AddBranch" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript" language="javascript">

//    function dateValidate() {

//       //debugger;

//        if (((document.getElementById("ctl00$ContentPlaceHolder1$txtEffectiveFrom").value) != "") ) 
//        {

//            var dateFrom = Date(document.getElementById("ctl00_ContentPlaceHolder1_txtDueDateFrom").value);
//            var curentDate = new Date();
//            
//            if (dateFrom < curentDate) {

//                alert("Effective from date must a future date including today");                
//                return false;

//            }
//            return true;
//              }
//
    //    }


    window.onload = function() {

        var msg = document.getElementById('ctl00_MasterMsg');
        if (msg && msg.innerHTML != '')
            showMessageBlock();
    }
</script>

<link href="../StyleSheets/salesOne_txtstyle.css" rel="stylesheet" type="text/css" />
    
   
    
   
    
   
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<table class="detailstable">
    <tr>
        <td colspan="3">
            <table cellpadding="0" cellspacing="0" class="style1">
                <tr>
                    <td>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr> 
        <td colspan="3">
            <asp:Label ID="lblHeader" runat="server" Font-Bold="True" Text="test" 
                CssClass="ph5"></asp:Label>
        </td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="GroupLabel" runat="server" Text="Group *:" CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:DropDownList ID="GroupDropDownList" runat="server" CssClass="ddl">
            </asp:DropDownList>
            <asp:Label ID="lblGroup1" runat="server" CssClass="lbl"></asp:Label>
            <asp:CompareValidator ID="CompareValidator2" runat="server" 
                ControlToValidate="GroupDropDownList" ErrorMessage="Required information is missing." 
                Operator="NotEqual" ValueToCompare="-1">*</asp:CompareValidator>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="CodeLabel" runat="server" Text="Code *:" CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtCode" runat="server" MaxLength="3" CssClass="txtbox"></asp:TextBox>
            <asp:Label ID="lblCode" runat="server" CssClass="lbl"></asp:Label>
            <asp:RequiredFieldValidator ID="CodeRequiredFieldValidator" runat="server" 
                ControlToValidate="txtCode" ErrorMessage="Required information is missing." 
                ToolTip="CodeRequiredFieldValidator is Required">*</asp:RequiredFieldValidator>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="NameLabel" runat="server" Text="Name *:" CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtName" runat="server" CssClass="txtbox"></asp:TextBox>
            <asp:Label ID="lblName" runat="server" CssClass="lbl"></asp:Label>
            <asp:RequiredFieldValidator ID="NameRequiredFieldValidator" runat="server" 
                ControlToValidate="txtName" ErrorMessage="Required information is missing." 
                ToolTip="NameRequiredFieldValidator is required">*</asp:RequiredFieldValidator>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="AddressLabel" runat="server" Text="Address:" CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtAdress1" runat="server" CssClass="txtbox"></asp:TextBox>
            <asp:Label ID="lblAddress1" runat="server" CssClass="lbl"></asp:Label>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            &nbsp;</td>
        <td class="style6"  >
            <asp:TextBox ID="txtAddress2" runat="server" CssClass="txtbox"></asp:TextBox>
            <asp:Label ID="lblAddress2" runat="server" CssClass="lbl"></asp:Label>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="CityLabel" runat="server" Text="City *:" CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtCity" runat="server" CssClass="txtbox"></asp:TextBox>
            <asp:Label ID="lblCity" runat="server" CssClass="lbl"></asp:Label>
            <asp:RequiredFieldValidator ID="CityRequiredFieldValidator" runat="server" 
                ControlToValidate="txtCity" ErrorMessage="Required information is missing." 
                ToolTip="CityRequiredFieldValidator is required">*</asp:RequiredFieldValidator>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="CountryLabel" runat="server" Text="Country *:" CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:DropDownList ID="CountryDropDownList" runat="server" CssClass="ddl">
            </asp:DropDownList>
            <asp:Label ID="lblCountry1" runat="server" CssClass="lbl"></asp:Label>
            <asp:CompareValidator ID="CompareValidator3" runat="server" 
                ControlToValidate="CountryDropDownList" ErrorMessage="Required information is missing." 
                Operator="NotEqual" ValueToCompare="-1">*</asp:CompareValidator>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="PostalCodeLabel" runat="server" Text="Postal Code:" 
                CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtPostalCode" runat="server" CssClass="txtbox"></asp:TextBox>
            <asp:Label ID="lblPostalCode" runat="server" CssClass="lbl"></asp:Label>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txtPostalCode" ValidationExpression="^\d*$">*</asp:RegularExpressionValidator>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="ContactNoLabel" runat="server" Text="Contact No *:" 
                CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtContactNo" runat="server" CssClass="txtbox" MaxLength="15"></asp:TextBox>
            <asp:Label ID="lblContactNo" runat="server" CssClass="lbl"></asp:Label>
            <asp:RequiredFieldValidator ID="ContactNoRequiredFieldValidator" runat="server" 
                ControlToValidate="txtContactNo" 
                ErrorMessage="Required information is missing." 
                ToolTip="ContactNoRequiredFieldValidator is required" 
                ValidationGroup="addBranch">*</asp:RequiredFieldValidator>
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="EffectiveFromLabel" runat="server" Text="Effective From *:" 
                CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtEffectiveFrom" runat="server" CssClass="txtbox"></asp:TextBox>
            <asp:Label ID="lblEffectiveFrom" runat="server" CssClass="lbl"></asp:Label>
            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/calander.jpg" />
            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtEffectiveFrom" PopupButtonID="Image1" Format="dd/MM/yyyy">
            </cc1:CalendarExtender>
            
            <asp:RequiredFieldValidator ID="EffectiveFromRequiredFieldValidator" 
                runat="server" ControlToValidate="txtEffectiveFrom" 
                ErrorMessage="Required information is missing." 
                ToolTip="EffectiveFromRequiredFieldValidator is required">*</asp:RequiredFieldValidator>
            
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                ControlToValidate="txtEffectiveFrom" 
                ValidationExpression="^([1-9]|0[1-9]|[12][0-9]|3[01])[/.]([1-9]|0[1-9]|1[012])[/.][0-9]{4}$">*</asp:RegularExpressionValidator>
            
        </td>
        <td  >
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style4"  >
            <asp:Label ID="EffectiveToLabel" runat="server" Text="Effective To *:" 
                CssClass="lbl1"></asp:Label>
        </td>
        <td class="style6"  >
            <asp:TextBox ID="txtEffectiveTo" runat="server" CssClass="txtbox" ></asp:TextBox>
            <asp:Label ID="lblEffectiveTo" runat="server" CssClass="lbl"></asp:Label>
            <asp:Image ID="Image2" runat="server" ImageUrl="~/images/calander.jpg" />
            <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtEffectiveTo" PopupButtonID="Image2" Format="dd/MM/yyyy">
            </cc1:CalendarExtender>
            
            <asp:RequiredFieldValidator ID="EffectiveToRequiredFieldValidator" 
                runat="server" ControlToValidate="txtEffectiveTo" 
                ErrorMessage="Required information is missing." 
                ToolTip="EffectiveToRequiredFieldValidator is required">*</asp:RequiredFieldValidator>
            
            <asp:CompareValidator ID="CompareValidator1" runat="server" 
                ControlToCompare="txtEffectiveFrom" ControlToValidate="txtEffectiveTo" 
                ErrorMessage="Effective To date must be greater than Effective From date." 
                Type="Date" Operator="GreaterThan">*</asp:CompareValidator>
            
            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                ControlToValidate="txtEffectiveTo" 
                ValidationExpression="^([1-9]|0[1-9]|[12][0-9]|3[01])[/.]([1-9]|0[1-9]|1[012])[/.][0-9]{4}$">*</asp:RegularExpressionValidator>
            
        </td>
        <td  >
            &nbsp;</td>
    </tr>
   
    <tr>
        <td class="pix8"   >
           </td>
        <td   >
            </td>
        <td  >
            </td>
    </tr>
    <table>
    <tr>
                    <td class="style5">
                        <asp:Button ID="btnDone" runat="server" CssClass="btn" onclick="btnDone_Click" OnClientClick="validationSummery();" 
                            Text="Done" />
                    </td>
                    <td>
                        <asp:Button ID="btnCan" runat="server" CausesValidation="False" CssClass="btn" 
                            onclick="btnCan_Click" Text="Cancel" />
                    </td>
                </tr>
                </table>
              
        
    



</asp:Content>

